package com.hundsun.yr.universal.p2p.interactor.impl;

import android.content.Context;

import com.hundsun.yr.universal.p2p.interactor.base.SegmentInteractor;
import com.hundsun.yr.universal.p2p.ui.activity.base.BaseFragment;
import com.hundsun.yr.universal.p2p.ui.fragment.AllProductFragment;

import java.util.ArrayList;
import java.util.List;


/**
 * @version V1.0
 * @Title: MineInvestSegmentInteractorImpl.java
 * @Description: 我的投资Segment集合
 * @date 2015-12-29 上午10:43:21
 * @author:hejun.shen
 * @email:shenhj15971@hundsun.com
 * @replace author:
 * @replace date:
 */
public class ProductSegmentInteractorImpl implements SegmentInteractor {
    String types[];

    public ProductSegmentInteractorImpl(String[] types) {
        this.types = types;
    }

    @Override
    public List<BaseFragment> getFragments(Context context) {
        // TODO Auto-generated method stub
        List<BaseFragment> fragments = new ArrayList<BaseFragment>();
        for (int i = 0; i < types.length; i++) {
            fragments.add(i, AllProductFragment.newInstance(types[i]));
        }
        return fragments;
    }
}
